function [preamble] = preamble_gen(N)
polynomial=[1 0 1 1 1 0 0 0 ];

p=zeros(N,1);
state=[1 1 1 1 1 1 1 1];


for index=1:100
    p(index)  = state(1);
    feedback  = mod(sum(polynomial.*state),2);
    state     = circshift(state',-1)';
    state(8)  = feedback; 
end

preamble = 1 - 2*p;